package com.it.data_queue;

import lombok.Data;

/**
 * @author: Coke
 * @DateTime: 2023/06/11/13:53
 * 环形数组
 **/
@SuppressWarnings ("all")
@Data
public class Array<E> {
    E[] array;
    int head = 0;
    int tail = 0;
    
    public Array (int capacity) {
        array = (E[]) new Object[capacity + 1];
    }
    
    public Array () {
        array = (E[]) new Object[10];
    }
    
}
